function main() {
    // let newRes = JSON.parse(result);
    debugger
    let self = this;
    getApiValue()
        .then(res => {
            debugger
            const newList = [
                {
                    name: "reportNum",
                    text: res[0].typeName,
                    value: res[0].typeValue,
                    unit: "",
                    color: "#33A7FB",
                    checked: false
                },
                {
                    name: "disposeNum",
                    text: res[1].typeName,
                    value: res[1].typeValue,
                    unit: "",
                    color: "#FA9804",
                    checked: false
                },
                {
                    name: "archiveNum",
                    text: res[2].typeName,
                    value: res[2].typeValue,
                    unit: "",
                    color: "#28CD78",
                    checked: false
                },
                {
                    text: res[3].typeName,
                    value: res[3].typeValue,
                    color: "#28CD78",
                    checked: false
                },
            ];
            let dataOverView = self.$$("csdn_form_data_overview_4fks89");
            dataOverView.data.props.dataSource.options = newList;
        })


}

function getApiValue() {
    return new Promise((resolve, reject) => {
        // 使用数据模型来代替默认查询逻辑，dataModeId为数据模型ID
        const dataModeId = "a160ff41-8a99-450c-bedf-e4d0f65bc4da"
        api.DATA_SOURCE_EXECUTE(dataModeId, "ddcat", [], [], "")
            .then(res => {
                if (res && res.result) {
                    resolve(res.result);
                } else {
                    reject(res);
                }
            });
    });
}
